// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   InputBean.java

package com.tool.tcpimg;

import java.awt.Color;
import java.math.BigDecimal;
import java.util.List;

import com.tool.tcp.Animation;
import org.come.bean.Coordinates;

public class InputBean
{

	private transient Integer index;
	private int type;
	private BigDecimal id;
	private BigDecimal liangId;
	private String name;
	private String goodNum;			//靓号
	private String goodNumType;		//靓号类型
	private String color;
	private Coordinates zb;
	private transient Color color2;
	private transient Integer s_x;
	private transient Integer s_y;
	private transient Integer e_x;
	private transient Integer e_y;
	private transient Integer height;
	private transient boolean isM;

	private List<Animation> ids;

	public InputBean()
	{
	}
	public String getGoodNumType() {
		return goodNumType;
	}

	public void setGoodNumType(String goodNumType) {
		this.goodNumType = goodNumType;
	}
	public String getGoodNum() {
		return goodNum;
	}

	public void setGoodNum(String goodNum) {
		this.goodNum = goodNum;
	}
	public InputBean(int type)
	{
		this.type = type;
	}

	public InputBean(int type, BigDecimal id, String name, String color)
	{
		this(null, type, id, name, color, null);
	}

	public InputBean(int index, int type, BigDecimal id, String name, String color)
	{
		this(Integer.valueOf(index), type, id, name, color, null);
	}

	public InputBean(int type, String name, Coordinates zb)
	{
		this(null, type, null, name, null, zb);
	}

	public InputBean(int type, BigDecimal id, String name, Coordinates zb)
	{
		this(null, type, id, name, null, zb);
	}

	public InputBean(Integer index, int type, BigDecimal id, String name, String color, Coordinates zb)
	{
		this.index = index;
		this.type = type;
		this.id = id;
		this.name = name;
		this.color = color;
		this.zb = zb;
	}

	public boolean isIndex(int offset)
	{
		return offset > index.intValue() && index.intValue() + name.length() > offset;
	}

	public boolean isMonitor(int x, int y)
	{
		if (height != null && y >= s_y.intValue() && y <= e_y.intValue() + height.intValue())
		{
			if (s_y.intValue() == e_y.intValue()) {
                return x >= s_x.intValue() && x <= e_x.intValue();
            }
			if (y <= s_y.intValue() + height.intValue()) {
                return x >= e_x.intValue();
            }
			if (y < e_y.intValue()) {
                return true;
            }
			if (x <= e_x.intValue()) {
                return true;
            }
		}
		return false;
	}

	public int getIndex()
	{
		return index.intValue();
	}

	public void setIndex(int index)
	{
		this.index = Integer.valueOf(index);
	}

	public int getType()
	{
		return type;
	}

	public void setType(int type)
	{
		this.type = type;
	}

	public BigDecimal getId()
	{
		return id;
	}

	public void setId(BigDecimal id)
	{
		this.id = id;
	}

	public BigDecimal getLiangId() {
		return liangId;
	}

	public void setLiangId(BigDecimal liangId) {
		this.liangId = liangId;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getColor()
	{
		return color;
	}

	public void setColor(String color)
	{
		this.color = color;
	}

	public Color getColor2()
	{
		return color2;
	}

	public void setColor2(Color color2)
	{
		this.color2 = color2;
	}

	public Integer getS_x()
	{
		return s_x;
	}

	public void setS_x(Integer s_x)
	{
		this.s_x = s_x;
	}

	public Integer getS_y()
	{
		return s_y;
	}

	public void setS_y(Integer s_y)
	{
		this.s_y = s_y;
	}

	public Integer getE_x()
	{
		return e_x;
	}

	public void setE_x(Integer e_x)
	{
		this.e_x = e_x;
	}

	public Integer getE_y()
	{
		return e_y;
	}

	public void setE_y(Integer e_y)
	{
		this.e_y = e_y;
	}

	public Integer getHeight()
	{
		return height;
	}

	public void setHeight(Integer height)
	{
		this.height = height;
	}

	public Coordinates getZb()
	{
		return zb;
	}

	public void setZb(Coordinates zb)
	{
		this.zb = zb;
	}

	public void setIndex(Integer index)
	{
		this.index = index;
	}

	public boolean isM()
	{
		return isM;
	}

	public void setM(boolean isM)
	{
		this.isM = isM;
	}

	public List<Animation> getIds() {
		return ids;
	}

	public void setIds(List<Animation> ids) {
		this.ids = ids;
	}
}
